#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
int main()
{
    stringstream ss;
    vector<int> v = {1,2,3};
    int temp;
    for(int i = 0; i<v.size(); i++)   
    {
        ss<<v[i]<<" ";
        ss>>temp;
        cout<<temp<<endl;
    }
    for(int i = 0; i<3; i++)
    {
        ss>>temp;
        cout<<temp<<endl;
    }
    cout<<"bye"<<endl;
}